const http = require('http')
const fs = require('fs')
const path = require('path')

http.createServer((req, res)=>{
    console.log('request come', req.url)
    const host = req.headers.host
    if (req.url==='/'){
        const html = fs.readFileSync(path.resolve(__dirname,'test.html'))
        res.end(html)
    }
}).listen(7777)

console.log('server listening 7777')
